//废弃
import { createStore } from 'vuex'

// 创建一个新的 store 实例
const store = createStore({
    state () {
        return {
            token: ''
        }
    },
    mutations: {
        set (state,newToken) {
            state.token = newToken
        }
    },
    actions: {
        add (context,addToken) {
            context.commit('set', addToken)
        }
    }
})

export default store